package com.itheima.enumdemo;


import java.util.Arrays;

@SuppressWarnings("all")
public enum Season {
    // 春,夏,秋,冬
    SPRING {
        @Override
        public void dance() {
            System.out.println("春的dance");
        }
        private void show(){

        }
    },
    SUMMER {
        @Override
        public void dance() {

        }
    },
    AUTUMN("秋"){
        @Override
        public void dance() {

        }
    },
    WINTER {
        @Override
        public void dance() {

        }
    };
    private String age;

    Season() {
    }

    Season(String name) {
        this.age = name;
    }
    @Deprecated
    public void  sing(){
        System.out.println("来一首只因你太美");
    }

    public abstract  void dance();

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }
}

class Test{


    public static void main(String[] args) {
        Season.AUTUMN.sing();
        Season.SPRING.dance();
        String name = Season.AUTUMN.getAge();
        System.out.println(name);
        String name1 = Season.AUTUMN.name();
        System.out.println(name1);
        Season[] values = Season.values();
        System.out.println(Arrays.toString(values));
    }
}